<include file="public:header"/>
<load href="__TMPL__public/css/uc.css" />   
<load href="__TMPL__/public/js/uc.js" />
<load href="__ROOT__/statics/css/formvalidator.css" />
<script language="javascript" type="text/javascript" src="__ROOT__/statics/js/jquery/plugins/formvalidator.js"></script>
<script language="javascript" type="text/javascript" src="__ROOT__/statics/js/jquery/plugins/formvalidatorregex.js"></script>

<div class="middle">
    <div class="uc clearfix account">
    	<div class="register">
         	<div id="reg_left">
            	<h2>新会员注册</h2>
                <div class="hint">加入{$site_name}，发现时尚，分享购物乐趣。</div>
                <form action="" method="post" id="myform">
                    <present name="err">
                    <div class="err" style="width:150px;">
                        <div class="icon_{$err.err}">{$err.msg}</div>                
                    </div>
                    </present>                  
                    <table style="margin:40px 0px 0px 30px;">
                        <tr>
                            <th>昵称：</th>
                            <td><input type="text" class="input_text" id="name" name="name" value="{$data.name}"/></td>
                        </tr>
                        <tr>
                            <th>电子邮箱：</th>
                            <td><input type="text" class="input_text" id="email" name="email" value="{$data.email}"/></td>
                        </tr>
                        <tr>
                            <th>性别：</th>
                            <td>
                            	<input type="radio" name="sex" value="0"/>男&nbsp;&nbsp;
                            	<input type="radio" name="sex" value="1"/>女&nbsp;&nbsp;
                                <input type="radio" name="sex" value="2" checked="checked"/>保密
                            </td>
                        </tr>
                        <tr>
                            <th>密码：</th>
                            <td><input type="password" class="input_text" name="passwd" id="passwd" value="{$data.passwd}"/></td>
                        </tr>
                        <tr>
                            <th>确认密码：</th>
                            <td><input type="password" class="input_text" id="confirm_passwd"/></td>
                        </tr>
                        <tr>
                            <th>验证码：</th>
                            <td>
                            	<input type="text" name="verify" id="verify" class="input_text left" style="width:100px;"/>
                            	<img src="{:u('public/verify')}" class="verify_img" class="left" 
                                onclick="this.src='{:u('public/verify')}'"
                                style="margin:5px 0px 0px 10px;"/>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <input name="dosubmit" type="submit" value=" " class="reg_btn"/>
                            </td>
                        </tr>
                    </table>
				</form>                
            </div>
            <div id="reg_right" class="login">
            	已有账号?请直接登录
                <a class="login_btn" href="{:u('uc/login')}"></a>
                
                <p>您也可以用以下方式登录</p>
                <div class="login_list clearfix">
                    <a href="{:u('uc/sina_login')}" class="sina" target="_blank"></a>
                    <a href="{:u('uc/qq_login')}" class="qq" target="_blank"></a>
                </div>                
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
$(function(){
	$.formValidator.initConfig({formid:"myform",autotip:true});
	
	$("#name").formValidator({onshow:"填写昵称",onfocus:"填写昵称"})
		.inputValidator({min:1,onerror:"请填写昵称"});
	$("#email")
		.regexValidator({regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onError:"你输入的邮箱格式不正确"});
	$("#passwd").formValidator({onshow:"填写密码",onfocus:"填写6位以上密码"})
		.inputValidator({min:6,onerror:"请填写6位以上密码"});
	
	$("#confirm_passwd").formValidator({onshow:"确认密码",onfocus:"确认密码",oncorrect:"填写正确"})
		.compareValidator({desid:"passwd",operateor:"=",onerror:"两次输入密码不一致"});
	$("#verify").formValidator({onshow:"填写验证码",onfocus:"填写验证码"})
		.inputValidator({min:4,onerror:"请填写验证码"});
});
</script>
<include file="public:footer"/> 